1. Field of the Invention
The present invention relates generally to computer graphics systems and methods, and more particularly, to the color generating of illumination produced by simulated light sources.
2. Related Art
The goal of most graphics systems is to humanize information. To realize this goal it is necessary to produce realistic three dimensional (3D) color images in real-time.
Producing local light illumination on an object is one of the most time consuming tasks for a graphics system. The basic lighting equation for one local light is: EQU C.sub.-- i=Ca.sub.-- i+Cd.sub.-- iLc.sub.-- i(L1.N1)!+Cs.sub.-- iLc.sub.-- i(H1.N1).sup.Oe !. (eq. 1)
In a computer graphics system, the color of an object can be denoted as a red, green and blue triple (RGB). The color of a lighted object is produced by one or more light sources. One type of light source is called a "local light source" or a "local light". Local light refers to the properties of color light at a particular point on an object.
Referring to FIG. 1, the lighted objects and local lights are placed in a 3 dimensional coordinate space which has 3 axes such as: x, y and z. According to the axes, a point P and a vector V in a 3 dimensional space can be denoted by their coordinate triples (Px, Py, Pz), and (Vx, Vy, Vz), respectively. C.sub.-- i, Ca.sub.-- i, Cd.sub.-- i, Cs.sub.-- i, and Lc.sub.-- i are components of RGB triples. In other words, "i" represents the red, green or blue component of light. C.sub.-- i is the final color of an object to be generated on screen. L1, H1, N1 are unit vectors in 3 dimensional space (unit vector is distinguished by the number "1" after the vector letter). L stands for light direction vector, V stands for view direction vector, H stands for the half angle vector (between vector L and vector V) shown in FIG. 1.
The unit vector L1 points from the object to the light. N1 is the unit normal vector of the object surface. H1 is the unit normalized H vector, where H=(L1+V1) (half angle vector between L and V), and V1 is a unit vector which points from the object to the viewer.
Ca.sub.-- i, Cd.sub.-- i, Cs.sub.-- i and Oe are the material property parameters of the object surface. These parameters are all simple predetermined coefficients. Ca.sub.-- i stands for ambient light, Cd stands for diffusion coefficient, and Cs stands for the specular reflection coefficient. Oe is a power exponent. Lc.sub.-- i is the light source color component (i.e., R, G, B).
L1.N1 is the vector dot product of L1 and N1. Other dot products are denoted in the same way. It should be noted that each vector consists of magnitude and direction. An in depth discussion producing color light is discussed in more detail in Foley, et al., Computer Graphics: Principles and Practice, pp. 721-734, Addison-Wesley Publishing Co., 1990.
The bottle neck in most graphics systems involves determining L1.N1 and H1.N1 in (eq. 1). In conventional systems, normally, the vector L from the object to the light and V from the object to the viewer are generated first. In order to generate L1.N1 and H1.N1, the standard graphics system will then instruct the processor to normalize L and V to produce L1 and V1, then H=(L1+V1), and H.H, etc. If the processor is pipelined, it takes several cycles to generate the result after an operation is issued in hardware (execution latency). If the next operation needs to use this result as an input, then it must wait for the result of the previous operation. If there is no other operations that may be performed in the intervening cycles, many no-operation cycles are incurred. As a result, execution time is slowed. In other words, the graphics system will not receive RGB colors fast enough for real-time display of 3D color images. Additionally, the processors' ability to perform other functions in parallel is significantly reduced.
Therefore, what is needed is graphics system able to generate 3D color images with simulated light sources faster and more efficiency than is presently possible.